<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    
    <div class="grid_24"> 
    <div class="grid_5"> <a href="home" title="#"><img height="120" width="200" src="jsp/user/images/logo-small.jpg" alt="#" /></a> </div>
    <c:choose>
    	<c:when test="${ empty user }">
    		<div class="grid_18 login-med">
		      <form action="home" method="post" class="login-box-med"  >
		          <input type="text" value="email" name="email" onblur="if (this.value == '') {this.value = 'email';}" onfocus="if (this.value == 'email') {this.value = '';}" />
		          <input type="password" value="password" name="password" onblur="if (this.value == '') {this.value = 'password';}" onfocus="if (this.value == 'password') {this.value = '';}" />
		          <input type="submit" value="" name="login"><a href="#" >Forgot your password?</a> &nbsp;<a href="register" >Sign Up</a>
		      </form>
	    	</div>
    		<c:choose>
    			<c:when test="${ empty error }">

    			</c:when>
    			<c:otherwise>
    			  <c:out value="${error}"></c:out>
    			</c:otherwise>
    		</c:choose>
    </c:when>
    <c:otherwise>
    	<div class="grid_18 login-med">
		      <h1>Welcome <c:out value="${user.firstName}"/> &nbsp; <c:out value="${user.lastName}"/></h1>
		      	<hr>
		          &nbsp;<a href="home?action=logout" >Logout</a>		      
	    	</div>    	
    </c:otherwise>    
    </c:choose>
    
	<div class="grid_18 search-med">
      <form action="#" class="search-box-med" >
        <label>
          <input type="text" value="search for..." name="search" onblur="if (this.value == '') {this.value = 'search for...';}" onfocus="if (this.value == 'search for...') {this.value = '';}" />
          <button type="submit" name="add"> <span> </span> </button>
        </label>
      </form>
    </div>
  </div>
  
  
  <div class="grid_24 menutab"> 
    <ul>
      <li><a href="home" title="Home">HOME</a></li>
      <li><a href="#" title="Movies">MOVIES</a></li>
      <li><a href="#"  title="Yellow Pages">YELLOW PAGES</a></li>
	  <li><a href="#"  title="Inspring Stories">INSPIRING STORIES</a></li>
	  <li><a href="#"  title="Studios">STUDIOS</a></li>
	  <c:if test="${not empty user }">
	  	<li><a href="user?who=me"  title="My Page">MY PAGE</a></li>
	  </c:if>      
	  <li><a href="#"  title="Help">HELP</a></li>
    </ul>
  </div>
<!-- HEADER FINISH -->
 
  <div class="clear height20"></div>